apply
Apply a gravity constant to an object and take care if layout direction is RTL or not.
Parameters
The desired placement of the object, as defined by the constants in this class.
The horizontal size of the object.
The vertical size of the object.
The frame of the containing space, in which the object will be placed. Should be large enough to contain the width and height of the object.
Receives the computed frame of the object in its container.
The layout direction.
See also
Apply a gravity constant to an object.
Parameters
The desired placement of the object, as defined by the constants in this class.
The horizontal size of the object.
The vertical size of the object.
The frame of the containing space, in which the object will be placed. Should be large enough to contain the width and height of the object.
Offset to apply to the X axis. If gravity is LEFT this pushes it to the right; if gravity is RIGHT it pushes it to the left; if gravity is CENTER_HORIZONTAL it pushes it to the right or left; otherwise it is ignored.
Offset to apply to the Y axis. If gravity is TOP this pushes it down; if gravity is BOTTOM it pushes it up; if gravity is CENTER_VERTICAL it pushes it down or up; otherwise it is ignored.
Receives the computed frame of the object in its container.
The layout direction.